<!--#include file="../Common/Config.asp"-->
<!--#include file="../Common/Function.asp"-->
<!--#include file="../Common/HO_Log.asp"-->
<!--#include file="../Common/EasyIDE.asp"-->
<!--#include file="../Common/HO_Label.asp"-->
<!--#include file="../Common/HotTemplate.asp"-->
<!--#include file="../Common/Cache.asp"-->

<%
	OpenDB
	Dim PageTemplateDir
	Dim PageContent
	
	PageTemplateDir =  "/HTMLTemplates/Template1/News/Display.html" 
	
 	PageContent = Label_ReplaceAllNewsDetailLabelsFromFile(PageTemplateDir)
 
 
	Response.Write(PageContent)
	
	CloseDB
	
	Function Label_ReplaceAllNewsDetailLabels(ByVal T)
		Dim NewsID
		Dim rs 
		Dim sql
		Dim label
		Dim i
		NewsID = SqlValue(Request.QueryString("ID"),1)
		Sql = "Select * From HO_News Where NewsID = " & NewsID
		gConn.execute "update HO_News set newshits = newshits + 1 where NewsID=" & newsid
		Set rs = gConn.Execute(Sql)
		If Not (rs.Eof) Then
			For i = 0 to rs.Fields.Count - 1				 
				label = gLabelPrefix & rs.Fields(i).name & gLabelSuffix			
				T = HO_ReplaceText(T,label, rs(i) )				 
			Next	
		End If
		Label_ReplaceAllNewsDetailLabels = T	
 
	End Function
	Function Label_ReplaceAllNewsDetailLabelsFromFile(ByVal FilePath)
		Dim tp
		Set tp = new hotTemplate
		tp.loadfile FilePath
		tp.Content = Label_ReplaceAllUserLabels(tp.Content)
		tp.Content = Label_ReplaceAllSystemLabels(tp.Content)		
		tp.Content = Label_ReplaceAllNewsDetailLabels(tp.Content)
		'tp.set_var "HO_TITLE","Heoffice"
		'tp.loadfile_fromcache "t.htm"
		tp.prase_file()
		Label_ReplaceAllNewsDetailLabelsFromFile = tp.Content 
	End Function
	
%>